<?php

	class cmd_products extends mdl_products
	{
		function getColumns($filter)
		{
			$columns = parent::getColumns($filter);
			$columns['isshopperview'] = array('label'=>'非会员是否可见','class'=>'span-1','type'=>'bool');   /* 非会员是否可见 */
			return $columns;
		}

		function getList($cols,$filter='',$start=0,$limit=20,&$count,$orderType=null)
		{
			//如果没有管理员登陆或者会员登录 则只显示允许会员查看的商品
			if (!isset($_COOKIE['SHOPEX_LOGIN_NAME'])&&(!isset($filter['mlevel'])||$filter['mlevel']=='-1'))
			{
				$filter['isshopperview'] = 'true';
			}
			$goodsList = parent::getList($cols,$filter,$start,$limit,$count,$orderType);

			return $goodsList;
		}
	}

?>